package com.jjx.trainingapi.service.impl;

import com.jjx.trainingapi.entity.vo.DataVProportionVo;
import com.jjx.trainingapi.entity.vo.DataVTopDataVo;
import com.jjx.trainingapi.entity.vo.DayPersonCountVo;
import com.jjx.trainingapi.mapper.DataVMapper;
import com.jjx.trainingapi.service.DatavService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author LoveHuahua
 * @date 2022年05月24日 11:42
 * @description believe in yourself
 */
@Service
public class DatavServiceImpl implements DatavService {


    @Autowired
    DataVMapper mapper;
    /**
     * 获取topCount的数据
     *
     * @param topCount 前几个
     * @return
     */
    @Override
    public List<DataVTopDataVo> getTopData(int topCount) {
        return mapper.getTopData(topCount);
    }

    /**
     * 获取年级刷题占比
     *
     * @return
     */
    @Override
    public List<DataVProportionVo> getProportion() {
        return mapper.getProportion();
    }

    /**
     * 获取刷题数量
     *
     * @return
     */
    @Override
    public List<DayPersonCountVo> getPersonCount() {
        return mapper.getPersonCount();
    }
}
